package com.guchenbo.lssp.core;

import com.guchenbo.lssp.domain.LivyStatementOutputQo;
import com.guchenbo.lssp.exception.SessionException;
import com.guchenbo.lssp.pool.LivyHelper;

/**
 * @author guchenbo
 */
public class Statement {
    private Long id;
    private Long sessionId;
    private LivyHelper livyHelper;

    public LivyStatementOutputQo.OutputDataJson executeQuery() throws SessionException {
        return livyHelper.queryStatement(getSessionId(), getId());
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getSessionId() {
        return sessionId;
    }

    public void setSessionId(Long sessionId) {
        this.sessionId = sessionId;
    }

    public LivyHelper getLivyHelper() {
        return livyHelper;
    }

    public void setLivyHelper(LivyHelper livyHelper) {
        this.livyHelper = livyHelper;
    }
}
